package vesion2.barrier;

import vesion2.object.GameObject;
import vesion2.object.Point;
import vesion2.tank.Bullet;

import java.awt.*;

public class Iron extends Barrier{
    public Iron(Point left_up, int width, int height) {
        super(left_up, width, height);
        backColor=new Color(0xCBCBD4);
    }
    public Iron(){
        this(new Point(),0,0);
    }
    @Override
    public void collideWithObject(GameObject object) {
        if(object instanceof Bullet)
            ((Bullet)object).setAlive(false);
    }
}
